/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package questionbook.service;

import java.util.List;
import questionbook.exception.IndividualAlreadyExistsException;
import questionbook.model.Answer;
import questionbook.model.Comment;
import questionbook.service.common.GenericService;

/**
 * This Service holds all Methods for all CRUD-Operations
 * that belong to the Category-Model
 * 
 * @author stefanstift
 */
public interface CommentService extends GenericService {

    /**
     * @return  an Comment Object with an generated URI, ready to use and to persist
     * @throws IndividualAlreadyExistsException
     */
     public Comment getIdentifiedComment() throws IndividualAlreadyExistsException;

     /**
      *
      * @param a the specifeid Answer
      * @return a List of all Comments for a specified Answer
      */
     public List<Comment> getByAnswer(Answer a);

     /**
      * Loads the CommentType for the specified Comment
      *
      * @param answer the Answer for which the comment was given
      * @param comment the comment for which the CommentType gets loaded
      */
     public void loadCommentType(Answer answer, Comment comment);


     /**
      * Persits a Comment in the Store
      *
      * @param comment the Comment that gets persisted
      * @param source the Answer fot which the Comment is stored
      */
     public void comment(Comment comment, Answer source);
    
}
